import MatchGameConfig from "./MatchGameConfig";
import SquareItem from "./SquareItem";
import EmptyObstacleItem from "./EmptyObstacleItem";

const { ccclass, property } = cc._decorator;

@ccclass
export default class EmptyObstacleItemCtrl extends SquareItem {

    willEliminated: boolean = false;
    pointerObstacle: any = null;
    itemInfo: any = null;
    obsIndex: number = 0;

    onLoad() {
        this.onUILoad();
        this.addButtonListen();
    }

    public ui;

    onUILoad() {
        this.ui = this.node.addComponent(EmptyObstacleItem);
    }

    addButtonListen() {
        // 添加按钮监听逻辑
    }

    initData() {
        // 初始化数据逻辑
    }

    public squareType;
    public _couldTouch;
    init(t: any, a: any, o: any, i: any) {
        this.squareType = MatchGameConfig.SquareType.ObstacleItem;
        this.itemInfo = i;
        this.canMove = false;
        this._couldTouch = false;
        this.pointerObstacle = o;
        this.willEliminated = false;
        super.init(t, a, MatchGameConfig.SquareType.ObstacleItem, this.itemInfo.ObstacleAllType, this.itemInfo);
        this.layerType = this.itemInfo.LayoutType;
    }

    onClear() {
        // 清除逻辑
    }
}
